/**
 * 
 */
package com.mobipe.sutto.messagehandler;

import java.nio.ByteBuffer;

import com.mobipe.sutto.core.AbstractServer;

/**
 * @author kohachiro
 * 
 */
public class HttpGetRequestHandler {
	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * com.sunkey.tdserver.messagehandler.MessageHandler#invoke(java.lang.Object
	 * , org.jboss.netty.channel.Channel)
	 */
	// @Override
	public static int invoke(ByteBuffer message, Object channel) throws Exception {
		AbstractServer.callbackHandler.sendResponseClose(ByteBuffer.wrap(("HTTP/1.1 200 OK\n"
				+ "Content-Type: text/html; charset=utf-8\n"
				+ "Content-Length: 20\n\n"
				+ "<h1>HELLO WORLD</h1>").getBytes()),channel);
		return MessageHandler.HttpGetRequest;
	}
}
